package com.maimao.spider.config;

import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

/**
 * @author MaoLin Wang
 * @date 2020/11/24 1:40 下午
 */
@Configuration
public class SelenConfig {

    @PostConstruct
    public void init(){
       /* System.setProperty("webdriver.chrome.driver", "/Users/wangmaolin/other/chromedriver/chromedriver");
        ChromeDriver driver=new ChromeDriver();
        driver.get("https://www.jd.com");
        StringBuilder sb=new StringBuilder();
        sb.append(jString).append("document.getElementById(\"cate_item1\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item2\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item3\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item4\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item5\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item6\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item7\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item8\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item9\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item10\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item11\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item12\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item13\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item14\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item15\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item16\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item17\").style=\"display:block\";\n")
                .append("document.getElementById(\"cate_item18\").style=\"display:block\";\n");
        ((JavascriptExecutor) driver).executeScript(sb.toString());*/
    }
}
